Skip to content

Conversation

@ecrupper
Copy link
Contributor

@ecrupper ecrupper commented Jun 1, 2022

When GitHub adds the redelivery job to their queue, they respond with a 202. That is passed down as an error from go-github with the body "job scheduled on GitHub side; try again later". We don't want to have a user try again later because once the job get pulled off the queue, it's successful.

So, in the code, I decided to check for that 202 status and shortcut the error checking in the case that the status matches. In my local testing, 100% of my calls to redeliver have resulted in a 202.

@ecrupper ecrupper requested a review from a team as a code owner June 1, 2022 16:00
@ecrupper ecrupper self-assigned this Jun 1, 2022
@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #654 (e6da7e9) into master (a7d8962) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #654      +/-   ##
==========================================
- Coverage   55.17%   55.15%   -0.02%     
==========================================
  Files         195      195              
  Lines       15896    15901       +5     
==========================================
  Hits         8770     8770              
- Misses       6753     6758       +5     
  Partials      373      373              
Impacted Files Coverage Δ
scm/github/webhook.go 86.10% <0.00%> (-1.09%) ⬇️

@wass3r wass3r merged commit b61a977 into master Jun 1, 2022
@wass3r wass3r deleted the fix/add-accepted-error-check branch June 1, 2022 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants